package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SignHistoryMapper;
import com.ruoyi.system.domain.SignHistory;
import com.ruoyi.system.service.ISignHistoryService;

/**
 * 签到历史Service业务层处理
 * 
 * @author kinglu
 * @date 2021-11-30
 */
@Service
public class SignHistoryServiceImpl implements ISignHistoryService 
{
    @Autowired
    private SignHistoryMapper signHistoryMapper;

    /**
     * 查询签到历史
     * 
     * @param userId 签到历史主键
     * @return 签到历史
     */
    @Override
    public SignHistory selectSignHistoryByUserId(Long userId)
    {
        return signHistoryMapper.selectSignHistoryByUserId(userId);
    }

    /**
     * 查询签到历史列表
     * 
     * @param signHistory 签到历史
     * @return 签到历史
     */
    @Override
    public List<SignHistory> selectSignHistoryList(SignHistory signHistory)
    {
        return signHistoryMapper.selectSignHistoryList(signHistory);
    }

    /**
     * 新增签到历史
     * 
     * @param signHistory 签到历史
     * @return 结果
     */
    @Override
    public int insertSignHistory(SignHistory signHistory)
    {
        return signHistoryMapper.insertSignHistory(signHistory);
    }

    /**
     * 修改签到历史
     * 
     * @param signHistory 签到历史
     * @return 结果
     */
    @Override
    public int updateSignHistory(SignHistory signHistory)
    {
        return signHistoryMapper.updateSignHistory(signHistory);
    }

    /**
     * 批量删除签到历史
     * 
     * @param userIds 需要删除的签到历史主键
     * @return 结果
     */
    @Override
    public int deleteSignHistoryByUserIds(Long[] userIds)
    {
        return signHistoryMapper.deleteSignHistoryByUserIds(userIds);
    }

    /**
     * 删除签到历史信息
     * 
     * @param userId 签到历史主键
     * @return 结果
     */
    @Override
    public int deleteSignHistoryByUserId(Long userId)
    {
        return signHistoryMapper.deleteSignHistoryByUserId(userId);
    }
}
